package cz.af.portletExams.model;

import org.joda.time.LocalDateTime;

public class Exam {

    private String id;

    private String subjectId;

    private LocalDateTime date;

    private Integer occupied;

    private Integer capacity;

    public Exam() {
    }

    public Exam(String id, String subjectId, LocalDateTime date) {
        this.id = id;
        this.subjectId = subjectId;
        this.date = date;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public LocalDateTime getDate() {
        return date;
    }

    public void setDate(LocalDateTime date) {
        this.date = date;
    }

    public Integer getOccupied() {
        return occupied;
    }

    public void setOccupied(Integer occupied) {
        this.occupied = occupied;
    }

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Exam exam = (Exam) o;
        if (id != null ? !id.equals(exam.id) : exam.id != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        return result;
    }

    @Override
    public String toString() {
        return "Exam{" +
                "id='" + id + '\'' +
                ", subjectId='" + subjectId + '\'' +
                ", date=" + date +
                ", occupied=" + occupied +
                ", capacity=" + capacity +
                '}';
    }
}
